package com.flick.service;

import com.flick.po.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.client.RestTemplate;

/**
 * Created by flick on 2017/5/10.
 */
@Service
public class RibbonService {
    @Autowired
    private RestTemplate restTemplate;

    public User findUserById(String id){
        return restTemplate.getForObject("http://microservice-provider-user/"+id,User.class);
    }
}
